//package run.siyuan.rabbitmq.ttl.message.consumer;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.stereotype.Component;
//import run.siyuan.common.constant.rabbitmq.Constants;
//
//import java.text.SimpleDateFormat;
//import java.util.Date;
//
///**
// * 延时demo消费者
// */
//@Slf4j
//@Component
//public class TtlConsumer {
//
//    @RabbitHandler
//    @RabbitListener(queues = Constants.TTL_DEMO_EXCHANGE_QUEUE)
//    public void ttlDemoConsumer(String msg) {
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        log.info("【延迟队列:{}】【" + sdf.format(new Date()) + "】收到死信队列消息：", Constants.TTL_DEMO_EXCHANGE_QUEUE, msg);
//    }
//
//}
